package cjq.demo.thread.ch6_2;

import java.util.concurrent.ConcurrentLinkedDeque;

/**
 * Created by Administrator on 2016/5/3.
 */
public class PollTask implements Runnable {
    private ConcurrentLinkedDeque<String> list;

    public PollTask(ConcurrentLinkedDeque<String> list){
        this.list= list;
    }

    public void run(){
        for (int i = 0; i < 5000; i++) {
            list.pollFirst();
            list.pollLast();
        }
    }
}
